﻿'Params
'user (Required) : The user name to fetch top albums for.
'period (Optional) : overall | 7day | 3month | 6month | 12month - The time period over which to retrieve top albums for.
'limit (Optional) : The number of results to fetch per page. Defaults to 50.
'page (Optional) : The page number to fetch. Defaults to first page.
'api_key (Required) : A Last.fm API key.

'Auth
' This service does not require authentication. 

Public Class UserGetTopAlbums
    Inherits BaseRequest

    Dim period As String = ""
    Dim user As String = ""
    Dim page As String = ""
    Dim limit As String = ""

	Public xmlresponse As XDocument = Nothing

	Public Sub New()
        Me.period = period
        Me.user = user
        Me.page = page
        Me.limit = limit
	End Sub

    Public Sub sendRequest(user As String, period As String, page As String, limit As String)
        InitializeMembers("user.getTopAlbums")

        AddMember("period", period, False)
        AddMember("user", user, True)
        AddMember("limit", limit, False)
        AddMember("page", page, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
    End Sub

	'	Public Function getResponse() As AlbumGetInfoResponse
	'	Dim response As New AlbumGetInfoResponse
	'		response.album = New Album(xmlresponse.<lfm>.<album>.First)
	'		Return response
	'	End Function
End Class
